f3054af8a8d45aa434e258fd26f1025582123de8,src/test/java/net/authorize/cim/functional_test/CIMTest.java,CIMTest,testZeroCustomerProfile,#,882

Before Change


        for (int i = 0; i < customerProfileIds.size(); i++) {
            transaction = merchant.createCIMTransaction(TransactionType.DELETE_CUSTOMER_PROFILE);
            transaction.setCustomerProfileId(customerProfileIds.get(i));
            result = (Result<Transaction>) merchant.postTransaction(transaction);
        }

        // test for getCustomerProfileIds request

After Change


        
        // Merchent credientials with zero CIM profiles (should be different from the credentials used for other tests)
        // warn: all customer profiles will be deleated for this account for testing purpose
        String zeroCIMApiLoginID =  "ZERO_CIM_API_LOGIN_ID";
	String zeroCIMTransactionKey = "ZERO_CIM_TRANSACTION_KEY";
        Merchant zeroCIMMerchant = Merchant.createMerchant( Environment.SANDBOX, zeroCIMApiLoginID, zeroCIMTransactionKey);
        
        // get all existing customer profile ids
        net.authorize.cim.Transaction transaction = zeroCIMMerchant.createCIMTransaction(TransactionType.GET_CUSTOMER_PROFILE_IDS);
        Result<Transaction> result = (Result<Transaction>) zeroCIMMerchant.postTransaction(transaction);
        ArrayList<String> customerProfileIds = result.getCustomerProfileIdList();

        // delete all existing customer profile